package org.idea.spring.aop.demo;

import sun.misc.ProxyGenerator;

import java.io.FileOutputStream;

/**
 * @Author linhao
 * @Date created in 12:14 下午 2021/5/6
 */
public class ProxyGeneratorDemo {

    public static void main(String[] args) throws Exception {
        byte[] result = ProxyGenerator.generateProxyClass("$Proxy",new Class[]{MyCalculate.class},12);
        FileOutputStream fileOutputStream = new FileOutputStream("$Proxy.class");
        fileOutputStream.write(result);
        fileOutputStream.flush();
        fileOutputStream.close();
    }
}
